
#ifndef _MEMBER_BLINEEDIT_H_
#define _MEMBER_BLINEEDIT_H_

#include <ctime>
#include <BLine2>
#include <BLineEdit>
#include "ILineBlock.h"

namespace BWE
{
	class member_BLineEdit
	{
		friend class BLineEdit;
	public:
		member_BLineEdit(BLineEdit* eidt);
		~member_BLineEdit();

		void emitEdited();

		bool freshSizes();
		void freshRects();
		BLine2 inputLine();

		BLineEdit*			boss;
		Align				align;
		int					spacing;
		BString				prefix;
		Align				prefixAlign;
		BString				suffix;
		Align				suffixAlign;
		bool				readOnly;
		BReal				blinkTick;
		BReal				blinkTime;
		bool				blinkShown;
		float				lineWidth;
		const BStyle*		prefixStyle;
		const BStyle*		suffixStyle;

		bool				dirtySize;
		BString				t_prefix;
		BSize				prefixSize;
		BRect				prefixRect;
		BString				t_suffix;
		BSize				suffixSize;
		BRect				suffixRect;
		BRect				textArea;

		bool				dirty;
		bool				editing;
		BReal				focusedTime;
		bool				pressed;
		int					pressedIndex;
		int					hoverIndex;
		ILineBlock			block;
	};
}

#endif